'use strict';

function grouping_count(collection) {
  let arr=collection.reduce(
    function reduced(allnums,num){
      if(num in allnums){
        allnums[num]++;
      }
      else {
        allnums[num]=1;
      }
      return allnums;
    },{}
  );
  return arr;
  //在这里写入代码
}

module.exports = grouping_count;
